import type { PageResult, ContributeJudge} from "@/types/contributeJudge";
import type { ContributePageRequestDTO, ContributeJudgeSubmitDTO } from "@/types/contributeJudge";
import { httpR2 } from "@/utils/http";

/**
 * 分页请求书本信息
 * @param query
 * @returns
 */
export const getContributeJudgePageResultApi = (query: ContributePageRequestDTO) => {
  return httpR2<PageResult>({
    method: "POST",
    url: "/content/contributeJudge/page",
    data: {
      ...query,
    },
  });
};

// /content/contribute/submit

export const submitContributeJudge = (query: ContributeJudgeSubmitDTO) => {
  return httpR2<ContributeJudge>({
    method: "POST",
    url: "/content/contributeJudge/submit",
    data: {
      ...query,
    },
  });
};


export const getContributeJudgeyId = (query: number) => {
  return httpR2<ContributeJudge>({
    method: "POST",
    url: `/content/contributeJudge/${query}`,
    data: {
    },
  });
};
